﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;

namespace BeatEmUp.Menu
{
    public class MenuScreen
    {
        public bool isVisibleAndActive { get; set; }
        protected Texture2D backgroundTexture;
        protected Rectangle backgroundRectangle;
        private GameManager game;
        private Rectangle gameTitleRect;
        public bool isTitleVisible = false;
        private Texture2D gameTitleImage;
        protected Color bgColor;

        public MenuScreen(GameManager game)
        {
            this.game = game;
            backgroundRectangle = new Rectangle(0,0, ((GameManager)this.game).graphics.PreferredBackBufferWidth, ((GameManager)this.game).graphics.PreferredBackBufferHeight);
            gameTitleRect = new Rectangle(((GameManager)this.game).graphics.PreferredBackBufferWidth / 2 - 250, 20, 500, 75);
        }

        protected void LoadBaseContent(ContentManager content)
        {
            backgroundTexture = content.Load<Texture2D>("MenuGraphics/background");
            gameTitleImage = content.Load<Texture2D>("MenuGraphics/gameTitle");
        }

        protected void DrawBaseElements(SpriteBatch sb)
        {
            GameManager.customResolution.Draw(backgroundTexture, backgroundRectangle, Rectangle.Empty,Color.White);
            if (isTitleVisible) GameManager.customResolution.Draw(gameTitleImage, gameTitleRect, Rectangle.Empty,Color.White);
        }
    }
}
